﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example.aspx.cs" Inherits="DreamCube.Websites.UI.Common.JQ.Controls.DropDownBtn.Example" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>调用案例</title>
</head>
<body>
    <form id="form1" runat="server">
    <DC:JQCSS runat="server" />
    <DC:JQControlsCSS runat="server" />
    <div>
        <input type="text" value="输入框1" inputType="dropdown" id="txt_drop1" />
        <input type="text" value="输入框2" inputType="dropdown" id="txt_drop2" />
        <input type="text" value="2013-01-03" inputType="datetime" style="position:absolute;left:100px;top:300px;" id="txt_drop3" />
    </div>
    <DC:MyJS runat="server" />
    <DC:JQJS ID="JQJS1" runat="server" />
    <DC:JQControlsJS runat="server" />
    </form>
</body>
</html>
<script type="text/javascript">
    $(document).ready(function () {
        $("input[inputType=dropdown],input[inputType=datetime]").setDropDownbtn(false, function () {
            var sValue = $(this)[0].value;
            if ($(this)[0].inputType !== "datetime") {
                alert(sValue + "下拉前的事件");
            }
            else {
                DateTimePanel.setDateTimeEl($(this));
            }
        }, function () {
            if ($(this)[0].inputType !== "datetime") {
                var sValue = $(this)[0].value;
                alert(sValue + "下拉的事件");
            }
        }, function () {
            if ($(this)[0].inputType !== "datetime") {
                var sValue = $(this)[0].value;
                alert(sValue + "下拉后的事件");
            }
        });
    });
</script>
